package com.forum.dto;

import org.springframework.stereotype.Component;

@Component
public class ConversationDto {
    private Integer id;       // 最新消息的ID
    private String content;   // 最新消息内容
    private String createAt;  // 最新消息发布时间（建议格式化为 "yyyy-MM-dd"）

    private UserDto user;     // 对方用户信息

    // getters & setters
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getCreateAt() {
        return createAt;
    }
    public void setCreateAt(String createAt) {
        this.createAt = createAt;
    }
    public UserDto getUser() {
        return user;
    }
    public void setUser(UserDto user) {
        this.user = user;
    }
}
